package xyz.jangle.thread;

import java.util.concurrent.TimeUnit;

public class StartMain {

	public static void main(String[] args) {
		
		TaskStart start = new TaskStart();
		Thread thread = new Thread(start);
		thread.start();
		try {
			TimeUnit.SECONDS.sleep(1);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		thread = new Thread(new TaskStart(true));	// 此处会将之前的线程弄成“垃圾”，且无法被垃圾回收器回收。
		thread.start();
		
	}

}
